package engine.newUi
{
	import engine.control.loading.MultLoader;
	import engine.control.loading.NxLoading;
	import engine.data.ResPath;
	import engine.ui.lite.BaseUI;
	
	import flash.display.DisplayObjectContainer;
	import flash.display.MovieClip;
	
	import newx.NxApi;
	import newx.com.ResManager;
	import newx.com.config.StaticIni;
	import newx.com.control.NxClip;
	import newx.com.control.button.NxButton;
	import newx.com.control.comboBox.NxComboBox;
	import newx.com.control.group.NxViewGroup;
	import newx.com.control.tab.NxTab;
	import newx.com.control.table.NxTable;
	import newx.com.control.text.NxLabel;
	import newx.com.control.text.NxText;
	import newx.com.control.window.NxWindow;

	/**
	 * 宠物界面 
	 * @author liuel
	 * 
	 */	
	public class PetUI extends BaseUI
	{
		private static var _self:PetUI;
//		public var panle:MovieClip;
		public var panle2:MovieClip;
		public var mc1:MovieClip;
//		public var mc3:MovieClip;
//		public var mc4:MovieClip;
//		public var mc5:MovieClip;
//		public var remanber:MovieClip;
//		public var remanber1:MovieClip;
//		public var zhandou:MovieClip;
//		public var gensui:MovieClip;
//		public var dengji2:MovieClip;
//		public var upgradeMC:MovieClip;;
//		
		public var preBtn:NxButton;
		public var nextBtn:NxButton;
//		public var btn1:NxButton;
//		public var btn2:NxButton;
//		public var btn3:NxButton;
//		public var btn4:NxButton;
//		
//		public var nameLabel:NxLabel;
		public var pageLabel:NxLabel;
//		public var lvLabel:NxLabel;
//		public var numLabel:NxLabel;
//		public var expMc:NxLabel;
//		public var label:NxLabel;
//		public var uplabel:NxLabel;
//		public var infolabel:NxLabel;
//		
//		public var vieGroup:NxViewGroup;
//		public var expLoading:NxLoading;
//		public var picMc:NxClip;
//		
//		public var clue1:NxLabel;
//		public var clue2:NxLabel;
//		
		public var nxtable:NxTab;
		public var petGroup:NxViewGroup;
//		
//		
		public var plan_1:MovieClip;
		public var mc:MovieClip;
		public var helpLable:NxLabel;
//		///////////////////////////////////喂养新添/////////////////////////////////////////////
//		public var gradetitle:MovieClip;
//		public var bottom1:MovieClip
//		public var bottom2:MovieClip
//		public var bottom3:MovieClip
//		public var bottom4:MovieClip
//		
//		//veinsmc 宠物界面背景图
//		public var veinsmc:NxClip;
//		
//		
//		public var equeGroup:NxViewGroup;
//		public var clueGroup:NxViewGroup;
//		/**品质**/
//		public var gradeMC:MovieClip
//		public var table1:NxWindow;
//		public var table2:NxWindow
//		public var table3:NxWindow
//		public var table4:NxWindow
//		public var table5:NxWindow;
//		/**改名**/
//		public var changName:NxButton;
//		public var timelabel:NxLabel;
//		/**
//		 *战力 
//		 */		
//		public var bellipotent:NxLabel;
//		/////////////////////////////////////属性新添////////////////////////////////////////////////////
//	
////		public var bgm1:MovieClip;
////		public var bgm2:MovieClip;
////		public var bgm3:MovieClip;
////		public var bgm4:MovieClip;
////		public var bgm5:MovieClip;
////		public var bgm6:MovieClip;
////		public var bgm7:MovieClip;
////		public var bgm8:MovieClip;
////		
////		public var bgm9:MovieClip;
////		public var bgm10:MovieClip;
////		public var bgm11:MovieClip;
////		public var bgm12:MovieClip;
////		public var bgm13:MovieClip;
////		public var bgm14:MovieClip;
////		public var bgm15:MovieClip;
////		public var bgm16:MovieClip;
//		
//		public var proloading:NxLoading
//		public var loadingLab:NxLabel;
//		
//		public var touxiang:MovieClip;
//		public var picMC:NxClip;
//		public var nameMc:MovieClip;
//		public var LevelMc:MovieClip;
//		public var mc6	:MovieClip;
//		public var mc7	:MovieClip;
//		public var prolvbg:MovieClip;
//		public var nxtext:NxText;
//		public var prolvMc:MovieClip;
//		public var proloadingMc:MovieClip;
//		public var medbg1:MovieClip;
//		public var medbg2:MovieClip;
//		public var medbg3:MovieClip;
//		public var medbg4:MovieClip;
//		
//		public var medBtn1:NxButton;
//		public var medBtn2:NxButton;
//		public var medBtn3:NxButton;
//		public var medBtn4:NxButton;
//		
//		public var petnameLabel:NxLabel;
//		public var petlvLabel:NxLabel;
//		
//		public var prolvLab:NxLabel;
//		public var labbel1:NxLabel;
//		public var labbel2:NxLabel;
//		public var labbel3:NxLabel;
//		public var labbel4:NxLabel;
//		public var labbel5:NxLabel;
//		public var labbel6:NxLabel;
//		public var labbel7:NxLabel;
//		public var labbel8:NxLabel;
//		public var labbel9:NxLabel;
//		public var labbel10:NxLabel;
//		public var labbel11:NxLabel;
//		public var labbel12:NxLabel;
//		public var labbel13:NxLabel;
//		public var labbel14:NxLabel;
//		public var labbel15:NxLabel;
//		public var labbel16:NxLabel;
//		public var labbel20:NxLabel;
//		/////////////////////////////////////传授新添////////////////////////////////////////////////////
//		public var pic1:MovieClip
//		public var pic2:MovieClip
//		public var picMC1:NxClip;
//		public var picMC2:NxClip;
//		public var star1:MovieClip
//		public var star2:MovieClip
//		
//		public var mc8:MovieClip;
//		public var lnamebg:MovieClip;
//		public var lnameMc:MovieClip;
//		public var lnameLab:NxLabel;
//		public var llvbg:MovieClip;
//		public var llvMc:MovieClip;
//		public var llvLab:NxLabel;
//		public var infoText:NxText;
//		public var impartBtn:NxButton;
//		public var jieshao:MovieClip;
//		public var rlvbg:MovieClip;
//		public var rlvMc:MovieClip;
//		public var rlvLab:NxLabel;
//		public var comboBox:NxComboBox;
//		////////////////////////////////////////////////////////介绍///////////////////////////////////////////////////////////
//		public var textmc4:MovieClip;
//		public var textmc5:MovieClip;
//		public var text1:NxText;
//		public var text2:NxText;
//		public var text3:NxText;
//		
//		public var textmc1:MovieClip;
//		public var textmc2:MovieClip;
//		public var textmc3:MovieClip;
//		
//		/**精通**/
//		public var masteryLable:NxLabel;
//		/**成长率**/
//		public var developLable:NxLabel;
//		/**精通图标**/
//		public var masteryGroup:MovieClip;
//		/**参展范围**/
//		public var attacktarea1:MovieClip;
//		public var attacktarea2:MovieClip
		
		public var panle:MovieClip;
		
		///////////////////////////////////////////////////属性///////////////////////////
		public var A_veinsmc:NxClip;
		public var A_bottom1:MovieClip
		public var A_bottom2:MovieClip
		public var A_bottom3:MovieClip
		public var A_bottom4:MovieClip
		/**模型**/
		public var A_picMc:NxClip;
		public var A_expLoading:NxLoading;
		public var A_remanber:MovieClip;
		/**名字**/
		public var A_nameLabel:NxLabel;
		/**等级**/
		public var A_lvLabel:NxLabel;
		/**经验**/
		public var A_expMc:NxLabel;
		public var A_mc3:MovieClip;
		public var A_mc4:MovieClip;
		public var A_mc5:MovieClip;
		public var A_remanber1:MovieClip;
		public var A_zhandou:MovieClip;
		public var A_gensui:MovieClip
		public var A_dengji2:MovieClip;
		/**技能**/
		public var A_clueGroup:NxViewGroup;
		public var A_equeGroup:NxViewGroup;
		/**改名**/
		public var A_changName:NxButton;
		/**品阶**/
		public var A_gradeMC:MovieClip;
		public var A_gradetitle:MovieClip;
		/**战力**/
		public var A_bellipotent:NxLabel;
		/**类型**/
		public var A_labbel20:NxLabel;
		/**生命**/
		public var A_labbel1:NxLabel;
		/**普攻**/
		public var A_labbel5:NxLabel;
		/**绝攻**/
		public var A_labbel6:NxLabel;
		/**普防**/
		public var A_labbel7:NxLabel;
		/**绝防**/
		public var A_labbel8:NxLabel;
		public var A_prolvLab:NxLabel;
		public var A_masteryLable:NxLabel;
		
		/**成长率**/
		public var A_developLable:NxLabel;
		/**范围图标**/
		public var A_attacktarea1:MovieClip;
		public var A_attacktarea2:MovieClip;
		/**精通容器**/
		public var A_masterycoin1:NxClip;
		public var A_masterycoin2:NxClip;
		public var A_masterycoin3:NxClip;
		public var A_masterycoin4:NxClip;
		public var A_masterycoin5:NxClip;
		public var A_masterycoin6:NxClip;
		public var A_masterycoin7:NxClip;
		public var A_masterycoin8:NxClip;
		///////////////////////////////////////////////////喂养///////////////////////////////////////
		public var B_touxiang:MovieClip;
		/**头像**/
		public var B_picMC:NxClip;
		public var B_nameMc:MovieClip;
		public var B_LevelMc:MovieClip;
		public var B_mc6:MovieClip;
		public var B_mc7:MovieClip;
		/**生命**/
		public var B_labbel2:NxLabel;
		/**普防**/
		public var B_labbel4:NxLabel;
		/**普攻**/
		public var B_labbel9:NxLabel;
		/**绝攻**/
		public var B_labbel11:NxLabel;
		/**绝防**/
		public var B_labbel13:NxLabel;
		/**等级**/
		public var B_petlvLabel:NxLabel;
		public var B_prolvMc:MovieClip;
		public var B_prolvbg:MovieClip;
		public var B_proloadingMc:MovieClip;
		/**经验条**/
		public var B_proloading:NxLoading;
		/**经验**/
		public var B_loadingLab:NxLabel;
		/**名字**/
		public var B_petnameLabel:NxLabel
		public var B_vieGroup:NxViewGroup;
		/**CD**/
		public var B_timelabel:NxLabel;
		/**喂养次数**/
		public var B_numLabel:NxLabel;
		/**介绍**/
		public var B_text1:NxText;
		
		public var B_uplabel:NxLabel;
		/////////////////////////////////////////////////// 传授///////////////////////////////
		public var E_pic1:MovieClip;
		/**左头像**/
		public var E_picMC1:NxClip;
		/**左品阶**/
		public var E_star1:MovieClip
		
		public var E_pic2:MovieClip;
		/**右头像**/
		public var E_picMC2:NxClip;
		/**右品阶**/
		public var E_star2:MovieClip
		/**传授动画**/
		public var E_mc8:MovieClip
		public var E_lnamebg:MovieClip;
		/**名字**/
		public var E_lnameLab:NxLabel
		public var E_llvbg:MovieClip
		public var E_llvMc:MovieClip
		/**左等级**/
		public var E_llvLab:NxLabel;
		public var E_rlvbg:MovieClip;
		public var E_rlvMc:MovieClip;
		/**右等级**/
		public var E_rlvLab:NxLabel;
		public var E_comboBox:NxComboBox;
		public var E_jieshao:MovieClip;
		/**介绍**/
		public var E_infoText:NxText;
		/**传授按钮**/
		public var E_impartBtn:NxButton;
		public var E_lnameMc:MovieClip;
		public var E_remand1:MovieClip;
		public var E_remand2:MovieClip;
		public var E_remand3:MovieClip;
		public var E_info1:NxLabel;
		public var E_info2:NxLabel;
		public var E_info3:NxLabel;
		public var E_title:MovieClip;
		public var E_ImpartAdd:MovieClip;
		///////////////////////////////////////////////强化///////////////////////////////////
		public var C_textmc1:MovieClip;
		public var C_viewGroup:NxViewGroup;
		public var C_text:NxText;
		public var C_textmc2:MovieClip;
		////////////////////////////////////////////////训练/////////////////////////////////////////////
		public var D_mc1:MovieClip;
		public var D_mc2:MovieClip;
		public var D_mc3:MovieClip;
		public var D_mc4:MovieClip;
		public var D_mc5:MovieClip;
		public var D_mc6:MovieClip;
		public var D_mc7:MovieClip;
		public var D_label1:NxLabel;
		public var D_label2:NxLabel;
		public var D_label3:NxLabel;
		public var D_label4:NxLabel;
		public var D_label5:NxLabel;
		public var D_label6:NxLabel;
		public var D_label7:NxLabel;
		public var D_label8:NxLabel;
		public var D_label9:NxLabel;
		public var D_label10:NxLabel;
		public var D_label11:NxLabel;
		public var D_label12:NxLabel;
		public var D_label13:NxLabel;
		public var D_label14:NxLabel;
		public var D_label15:NxLabel;
		public var D_label16:NxLabel;
		public var D_label17:NxLabel;
		public var D_label18:NxLabel;
		
		public var D_pic:NxClip;  //头像
		public var D_Item:NxClip;
		public var D_itemLable1:NxLabel;
		public var D_itemLable2:NxLabel;
		public var D_cusceLable:NxLabel;
		public var D_btn:NxButton;
		public var D_mcc:MovieClip;
		public var D_nameLable:NxLabel;
		public var D_ItemLable2:NxText;
		
		public var D_upgrade:NxButton;
		public static function getInstance():PetUI
		{
			if(_self==null)
			{
				_self=new PetUI();
			}
			return _self;
		}
		public function PetUI(popupUI:Boolean=true)
		{
			super(popupUI);
		}
		override public function show(space:DisplayObjectContainer=null, onshow:Function=null, ...argc):void
		{
//			veinsmc.visible=false ; 
			if(!MultLoader.getInstance().getSourceByUrl(ResPath.SWF +"petui"+".swf" ))
			{
				MultLoader.getInstance().load([ResPath.SWF +"petui"+".swf" ],true ,create);
			}else
			{
				create();
			}
		}
		private function create():void
		{
			A_veinsmc.source = MultLoader.getInstance().getSourceByUrl(ResPath.SWF +"petui"+".swf" );
			super.show();
		}
		override public function  Init():void
		{
			PetLoic.getInstance().Init();
		}
		override protected function	BeforeShow():void
		{
			E_remand1.visible=E_remand2.visible=E_remand3.visible=false;
			E_info1.text=E_info2.text=E_info3.text="";
			helpLable.htmlText = StaticIni.getSwfLangStr("Pet_Get_Means");
			PetLoic.getInstance().BeforeShow();
		}
		override protected function	AfterHide():void
		{
			PetLoic.getInstance().AfterHide();
		}
	}
}